"use strict"

app.controller("MainController", function ($scope) {
    $scope.locations = [
          {
              id: 1,
              title: 'North Room',
              body: ['You can go south',
					 'or do nuffink'],
              commands: [
                  { commandtext: 'Go South', gotodestinationid: 2 },
                  { commandtext: 'Do Nuffink', gotodestinationid: 1 }
              ]
          },
          {
              id: 2,
              title: 'South Room',
              body: ['You can go north'],
              commands: [
                  { commandtext: 'Go North', gotodestinationid: 1 },
                  { commandtext: 'Do Nuffink', gotodestinationid: 2 }
              ]
          }
    ];
	
    $scope.init = function() {$scope.locationid = 1;}
	$scope.goto = function(command) {
        $scope.locationid = command.gotodestinationid;
    }


});